<extend name="Public/base"/>

<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu" />
</block>


<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>
		草稿箱({$_total})
		</h2>
	</div>

	<!-- 按钮工具栏 -->
	<div class="cf">
		<div class="fl">
			<if condition="auth_check('Admin/Article/del')"><button class="btn ajax-post confirm" target-form="ids" url="{:U('Article/del')}">删 除</button></if>
		</div>

		<!-- 高级搜索 -->
		<div class="search-form fr cf">
		</div>
	</div>


	<!-- 数据表格 -->
    <div class="data-table">
	<table class="">
    <thead>
        <tr>
		<th class="row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">编号</th>
		<th class="">标题</th>
		<th class="">分类</th>
		<th class="">最后更新</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
		<volist name="list" id="vo">
		<tr>
            <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
			<td>{$vo.id} </td>
			<td>
			<if condition="auth_check('Admin/Article/edit')">
				<a data-id="{$vo.id}" href="{:U('Article/edit?cate_id='.$vo['category_id'].'&id='.$vo['id'])}">{$vo.title}</a>
			<else/>
				{$vo.title}
			</if>
			</td>
			<td><span>{$vo.category_id|get_cate}</span></td>
			<td><span>{$vo.update_time|time_format}</span></td>
			<td>
				<if condition="auth_check('Admin/Article/edit')"><a href="{:U('Article/edit?cate_id='.$vo['category_id'].'&id='.$vo['id'])}">编辑</a></if>
				<if condition="auth_check('Admin/Article/pub')"><a href="{:U('Article/pub?id='.$vo['id'])}" class="ajax-get">发布</a></if>
				<if condition="auth_check('Admin/Article/del')"><a href="{:U('Article/del?ids='.$vo['id'])}" class="confirm ajax-get">删除</a></if>
            </td>
		</tr>
		</volist>
	</tbody>
    </table> 
        	</div>

	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
</div>

</block>